<? if(!defined('IN_ROOT')) exit('Access Denied'); ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd"><? $user=$this->user; $setting=$this->setting; ?><html xmlns="http://www.w3.org/1999/xhtml">

<head>
<title>Manyou's Control Panel</title>
<meta http-equiv="Content-Type" content="text/html; charset=<?=MY_CHARSET?>">
<link media="all" type="text/css" href="css/common/admin/admincp.css" rel="stylesheet" />
<script src="js/jquery.js" type="text/javascript"></script>
<script src="js/jqueryui.js" type="text/javascript"></script>
<script src="js/admin.js" type="text/javascript"></script>
<script type="text/javascript">
function remove(lid){
if(confirm('删除该线路，确定继续?')){
window.location="index.php?admin_line/remove/"+lid+"<?=$setting['seo_suffix']?>";;
}
}
</script>
</head>
<body>
<div class="container"><? if(isset($message)) { $type=isset($type)?$type:'correctmsg';  ?><div class="<?=$type?>"><p><?=$message?></p></div><? } ?><h3>线路列表 <!--a href="index.php?admin_line/add<?=$setting['seo_suffix']?>" class="sgbtn">添加线路</a--> </h3>
<div class="mainbox">
<div class="note fixwidthdec">
<p class="i">线路管理。</p>
</div>
<div class="mainbox"><form name="userForm" action="index.php?admin_line/remove<?=$setting['seo_suffix']?>" method="post">
<table width="80%" cellspacing="0" cellpadding="3" class="list">
<tr align="center" class="list_title">
<th><input class="checkbox" id="chkall" onclick="checkall('lid[]')" type="checkbox" name="chkall"><label for="chkall">全选</label></th>
<th><strong>线路名称</strong></th>
<th><strong>发布者</strong></th>
<th><strong>添加时间</strong></th>
<th>已审核</th>
<th><strong>编辑</strong></th>
<th><strong>删除</strong></th>

</tr>    

    <input type="hidden" name="hiddencid" value="<?=$pid?>" />
<? if(is_array($linelist)) { foreach($linelist as $line) { ?>
<tr style="background:#f7f7f7">
<td class="option" align="center"><input class="checkbox" type="checkbox" value="<?=$line['id']?>" name="lid[]"></td>
<td align="center"><input name="order[]" type="hidden" value="<?=$line['id']?>"/><a href="<?=$line['url']?>" target="_blank"><?=$line['title']?></a></td>
<td align="center"><?=$line['user']?></td>
<td align="center"><?=$line['time']?></td>
<td align="center"><? if($line['ifcheck']==1) { ?><font color="Red">是</font><? } else { ?>否<? } ?></td>
<td align="center"><a href="index.php?admin_line/edit/<?=$line['id']?><?=$setting['seo_suffix']?>"><img src="<?=SITE_URL?>css/common/admin/edit.png"></a></td>
<td align="center"><a href="javascript:remove(<?=$line['id']?>)"><img src="<?=SITE_URL?>css/common/admin/remove.png"></a></td>

</tr>
<? } } ?>
<tr class="nobg">
                            <td colspan="7" class="tdpage"><div class="pages"><?=$departstr?></div></td>
                        </tr>
                        <tr class="nobg">
                            <td colspan="7"><input class="btn" type="button" name="elect" onclick="commenduser(1);" value="审核通过" />&nbsp;&nbsp;<input class="btn" type="button" name="elect" onclick="commenduser(0);" value="取消审核" />&nbsp;&nbsp;<input class="btn" type="button" name="delete" onclick="remove();" value="删除" /></td>
                        </tr>

                    </table>
                </form>

</div>
</div>
    <script type="text/javascript">
        function commenduser(type){
            if($("input[name='lid[]']:checked").length == 0){
                alert('你没有选择任何线路');
                return false;
            }
            document.userForm.action="index.php?admin_user/famous/"+type+"<?=$setting['seo_suffix']?>";
            document.userForm.submit();
        }

        function remove(){
            if($("input[name='uid[]']:checked").length == 0){
                alert('你没有选择任何用户');
                return false;
            }
            if(confirm('确认删除该用户?此操作不可恢复!')==false){
                return false;
            }
            document.userForm.action="index.php?admin_user/remove<?=$setting['seo_suffix']?>";
            document.userForm.submit();
        }
    </script>
</body>

</html>
